
#ifndef __M_ANCS_H__
#define __M_ANCS_H__

#include <stdbool.h>
#include <stdint.h>
#include "ble_advdata.h"
#include "ble_ancs_c.h"
#include "m_ancs_drv.h"

/**@brief String literals for the iOS notification attribute types. used then printing to UART. */
static const char *lit_attrid[BLE_ANCS_NB_OF_ATTRS] = {"App Identifier", "Title", "Subtitle", "Message", "Message Size", "Date", "Positive Action Label", "Negative Action Label"};

// 苹果消息推送顺序
typedef enum
{
    NOTIFY_INFO_ORDER_APP_ID,
    NOTIFY_INFO_ORDER_TITLE,
    NOTIFY_INFO_ORDER_SUBTITLE,
    NOTIFY_INFO_ORDER_MESSAGE,
    NOTIFY_INFO_ORDER_MESSAGE_SIZE,
    NOTIFY_INFO_ORDER_DATE,
    NOTIFY_INFO_ORDER_POSITIVE_ACT,
    NOTIFY_INFO_ORDER_NEGATIVE_ACT,
    NOTIFY_INFO_ORDER_END
} notify_info_order_t;

#define ANCS_PAIRING_MODE_CHECK(mode)                                                                                                                                                                  \
    do                                                                                                                                                                                                 \
    {                                                                                                                                                                                                  \
        if (mode == true)                                                                                                                                                                              \
        {                                                                                                                                                                                              \
            return;                                                                                                                                                                                    \
        }                                                                                                                                                                                              \
    } while (0)

void m_dev_security_pair_req(void);
void m_ancs_on_ble_evt(ble_evt_t *p_ble_evt);
void m_ancs_ble_evt_dispatch(ble_evt_t *p_ble_evt);
void m_ancs_advertising_init(ble_uuid_t *adv_uuids, ble_advdata_t *advdata);
void m_ancs_services_init(void);
void m_ancs_vendor_uuid_set(uint16_t *uuid_count);
void m_ancs_app_sched_execute(void);
void m_ancs_scheduler_init(void);
void m_ancs_db_discovery_init(void);
void m_ancs_device_manager_init(bool erase_bonds);
void m_ancs_timer_creat(void);
void m_ancs_force_init(void);

#endif
